stage.set_background_color("lightblue")
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_left(45)
# sprite = codesters.Rectangle(x, y, width, height, "color")
sprite = codesters.Rectangle(0, 0, 700, 100, "gold")
sprite.turn_right(45)
sprite = codesters.Sprite("earth")
people_sprites = ['person1', 'person2', 'person3', 'person4', 'person5', 'person6',
'person7', 'person8','person9', 'person10', 'person11', 'person12']
t = codesters.Teacher()
try:
tval_1 = rotate
except:
tval_1 = "DNE"
t1 = TestObjective()
if tval_1 == "DNE":
t1.add_failure(tval_1 == "DNE", "Did you create the integer variable and name it rotate?")
else:
t1.add_success(tval_1 == 90, "Great job!")
t1.add_failure(tval_1 == 25, "Did you change the integer to 90")
t1.add_failure(tval_1 != 90, "Did you change the integer to 90?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
# for testcase in tester.feedback_list:
# print(testcase.message, testcase.message_type)
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)